import {
	https
} from "./router";

//首页轮播图
export function banner(){
	return https({
		url:'index/getSlides?type=index',
		method:'GET'
	})
}

//注册
export function register(data){
	return https({
		url:'user/register',
		method:'POST',
		data
	})
}

//获取验证码
export function send(data){
	return https({
		url:'sms/send',
		method:'POST',
		data
	})
}

//登录
export function login(data){
	return https({
		url:'user/login',
		method:'POST',
		data
	})
}

//首页公告
export function dynamics(data){
	return https({
		url:'index/getDynamics',
		method:'GET',
		data
	})
}

//首页商城
export function list(data){
	return https({
		url:'Productlists/listsByField',
		method:'GET',
		data
	})
}

//商品分类
export function cates(){
	return https({
		url:'index/cates',
		method:'GET',
	})
}

//商品分类 二级分类
export function scates(){
	return https({
		url:'index/scates',
		method:'GET',
	})
}

//商品详情
export function detail(data){
	return https({
		url:`Productlists/read?id=${data.id}`,
		method:'GET',
	})
}

//商品sku
export function sku(data){
	return https({
		url:`Productlists/sku`,
		method:'GET',
		data
	})
}

//个人信息
export function user(){
	return https({
		url:`user/index`,
		method:'GET'
	})
}

//财务流水
export function moneyChanges(data){
	return https({
		url:`User/moneyChanges`,
		method:'POST',
		data
	})
}

//公益值当前价格
export function getPrice(){
	return https({
		url:`index/getPrice`,
		method:'GET'
	})
}

//公益值转消费值
export function Moneychange(data){
	return https({
		url:`Moneychange/tfh`,
		method:'POST',
		data
	})
}

//我的团队
export function myTeam(data){
	return https({
		url:`user/myTeam`,
		method:'POST',
		data
	})
}

//地址列表	
export function Transport(data){
	return https({
		url:'Transport/index',
		method:"POST",
		data
	})
}

//默认地址	
export function readd(data){
	return https({
		url:'Transport/readd',
		method:"POST",
		data
	})
}

//修改、新增、修改默认地址	
export function address(data){
	return https({
		url:'Transport/address',
		method:"POST",
		data
	})
}

//删除地址	
export function deleteAdd(data){
	return https({
		url:'Transport/delete',
		method:"POST",
		data
	})
}

//省市区	
// export function District(){
// 	return https({
// 		url:'District/lists',
// 		method:"POST",
// 	})
// }

//省市区	
export function District(){
	return https({
		url:'District/lists',
		method:"POST",
	})
}

//地址详情	
export function read(data){
	return https({
		url:'Transport/read',
		method:"POST",
		data
	})
}

//获取openid
export function getOpenId(data){
	return https({
		url:`index/getOpenId?code=${data.code}`,
		method:"GET"
	})
}

//配置信息	
export function getConfigs(data){
	return https({
		url:`index/getConfigs?name=${data.name}`,
		method:"GET"
	})
}

//订单支付	
export function preOrder(data){
	return https({
		url:`Productlisto/preOrder`,
		method:"POST",
		data
	})
}

//商品清单	
export function getOrder(data){
	return https({
		url:`Productlisto/getOrder`,
		method:"POST",
		data
	})
}

//创建订单	
export function createorder(data){
	return https({
		url:`Productorder/createorder`,
		method:"POST",
		data
	})
}

//复制子账号	
export function makeSon(data){
	return https({
		url:`User/makeSon`,
		method:"POST",
		data
	})
}

//子账号列表
export function sons(){
	return https({
		url:`User/sons`,
		method:"POST"
	})
}

//切换子账号
export function sonLogin(data){
	return https({
		url:`User/sonLogin`,
		method:"POST",
		data
	})
}

//订单列表
export function lists(data){
	return https({
		url:`Productorder/lists`,
		method:"POST",
		data
	})
}

//资产互转
export function tfReply(data){
	return https({
		url:`Moneychange/tfReply`,
		method:"POST",
		data
	})
}

//k线
export function Index(){
	return https({
		url:`Index/getPrices`,
		method:"POST"
	})
}

//重置密码
export function resetpwd(data){
	return https({
		url:`User/resetpwd`,
		method:"POST",
		data
	})
}

//修改密码
export function changePwd(data){
	return https({
		url:`User/changePwd`,
		method:"POST",
		data
	})
}

//设置二级密码
export function resetpwd2(data){
	return https({
		url:`User/resetpwd2`,
		method:"POST",
		data
	})
}

//验证二级密码
export function checkpwd2(data){
	return https({
		url:`User/checkpwd2`,
		method:"POST",
		data
	})
}

//立即支付
export function payNow(data){
	return https({
		url:`Productorder/pay`,
		method:"POST",
		data
	})
}

//验证订单状态
export function checkOrder(data){
	return https({
		url:`Productorder/checkOrder`,
		method:"POST",
		data
	})
}

//立即支付
export function authUser(data){
	return https({
		url:`User/authUser`,
		method:"POST",
		data
	})
}

//银行卡列表
export function banksindex(data){
	return https({
		url:`banks/index`,
		method:"POST",
		data
	})
}

//银行卡添加
export function bankscreate(data){
	return https({
		url:`banks/create`,
		method:"POST",
		data
	})
}

//银行卡添加
export function banksread(data){
	return https({
		url:`banks/read`,
		method:"POST",
		data
	})
}

//银行卡修改
export function banksedit(data){
	return https({
		url:`banks/edit`,
		method:"POST",
		data
	})
}

//退货
export function Withdraw(data){
	return https({
		url:`Withdraw/create`,
		method:"POST",
		data
	})
}

//修改二级密码
export function changepwd2(data){
	return https({
		url:`User/changepwd2`,
		method:"POST",
		data
	})
}

//修改二级密码
export function changeArea(data){
	return https({
		url:`user/changeArea`,
		method:"POST",
		data
	})
}

//退货列表
export function withdrawlistsx(data){
	return https({
		url:`Withdraw/lists`,
		method:"POST",
		data
	})
}

//商户信息
export function getUserinfo(data){
	return https({
		url:`User/getUserinfo`,
		method:"POST",
		data
	})
}

//支付
export function Withdrawlists(data){
	return https({
		url:`User/payOrder`,
		method:"POST",
		data
	})
}

//拼团列表
export function groupsLists(data){
	return https({
		url:`Groups/lists`,
		method:"POST",
		data
	})
}

//拼团列表
export function groupsCreate(data){
	return https({
		url:`Groups/create`,
		method:"POST",
		data
	})
}

//挂卖市场
export function moneysorderLists(data){
	return https({
		url:`Moneysorder/lists`,
		method:"POST",
		data
	})
}

//买入
export function moneysorderGoBuy(data){
	return https({
		url:`Moneysorder/goBuy`,
		method:"POST",
		data
	})
}

//卖出
export function moneysorderCreate(data){
	return https({
		url:`Moneysorder/create`,
		method:"POST",
		data
	})
}

//积分互转
export function moneychangeTfReply(data){
	return https({
		url:`Moneychange/tfReply`,
		method:"POST",
		data
	})
}

//团购释放
export function staticLists(data){
	return https({
		url:`User/staticLists`,
		method:"POST",
		data
	})
}
//合伙人释放
export function partnerLists(data){
	return https({
		url:`user/partnerLists`,
		method:"POST",
		data
	})
}

//充值红积分
export function rechargeCreate(data){
	return https({
		url:`Recharge/create`,
		method:"POST",
		data
	})
}

//分享二维码
export function makeQrcode(data){
	return https({
		url:`User/makeQrcode`,
		method:"POST",
		data
	})
}

//提货申请
export function productCreate(data){
	return https({
		url:`Product/create`,
		method:"POST",
		data
	})
}

//提货记录
export function productLists(data){
	return https({
		url:`Product/lists`,
		method:"POST",
		data
	})
}

//购物车列表
export function cartList(data){
	return https({
		url:`Productcart/lists`,
		method:"POST",
		data
	})
}

//加入购物车
export function cartCreate(data){
	return https({
		url:`Productcart/create`,
		method:"POST",
		data
	})
}

//删除商品
export function delCart(data){
	return https({
		url:`Productcart/del`,
		method:"POST",
		data
	})
}

//退货申请
export function cousout(data){
	return https({
		url:`Withdraw/create`,
		method:"POST",
		data
	})
}

//支付宝信息
export function changeAlipay(data){
	return https({
		url:`user/changeAlipay`,
		method:"POST",
		data
	})
}

// 修改手机号
export function changePhone(data){
	return https({
		url:`user/changemobile`,
		method:"POST",
		data
	})
}

// 奖品列表
export function getSthList(data){
	return https({
		url:`productbonus/lists`,
		method:"POST",
		data
	})
}

//提货管理列表
export function getSthAdmin(data){
	return https({
		url:`Product/lists`,
		method:"POST",
		data
	})
}

// 提交管理
export function sumbitAdmin(data){
	return https({
		url:`Product/createv1`,
		method:"POST",
		data
	})
}

// 场次列表
export function getBuysList(data){
	return https({
		url:`Index/getGroups`,
		method:"POST",
		data
	})
}

//撤单接口
export function getbackOrder(data){
	return https({
		url:`Moneysorder/backOrder`,
		method:"POST",
		data
	})
}
//获取系统会员
export function getMembers(data){
	return https({
		url:`Index/getMembers`
	})
}
//确认提货
export function confirmWd(data){
	return https({
		url:`Withdraw/confirmWd`,
		method:"POST",
		data
	})
}